Skip to content

Refactor and use environment variables#9

Merged
kemp merged 4 commits into
developmentfrom
refactoring-and-using-env-variables
Sep 11, 2020
Merged

Refactor and use environment variables#9
kemp merged 4 commits into
developmentfrom
refactoring-and-using-env-variables

Conversation

@kemp

@kemp kemp commented Sep 11, 2020

Copy link
Copy Markdown
Member

Hello! 👋

I made a couple changes, most of which are described in detail in the commit history. In summary, I refactored flaskapp.py to use external methods for mathpix and latex processing in order to try to reduce the code duplication. Second, I changed the mathpix code to remove the API keys from the version control and instead use environment variables, which are not included in source control. I have instructions in mathpix-variables.env.example.

Let me know if you have any questions or if I should create two pull requests for the two changes instead of just one.

flaskapp.py now relies less on making HTTP requests and is more DRY (Don't Repeat Yourself) by using the new mathpix.py and latex_solver.py modules.
See instructions in mathpix-variables.env.example for how to add environment variables
- Made a specific note to help users add the environment variables.
- Moved some of the documentation to a separate folder.
- Made a note of the docker documentation from the README
@kemp kemp added this to the Sprint 1 - MVP milestone Sep 11, 2020
@kemp kemp merged commit 95f2c19 into development Sep 11, 2020
@kemp kemp deleted the refactoring-and-using-env-variables branch September 11, 2020 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant